﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<Excell_On_Services.ViewModels.ServicesDisplayModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <p class="mc_title">Services Manager </p>
    <div class="content-box"><!-- Start Content Box -->
        <div class="content-box-header">
			Search
		</div>

        <div class="content-box-content">
			   
			<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
					
				<%--<div class="notification attention png_bg">
					<a href="#" class="close"><img src="../../Content/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
					<div class="warning_text">
						This is a Content Box. You can put whatever you want in it. By the way, you can close this notification with the top-right cross.
					</div>
				</div>--%>

                <table width="100%">
							
				    <thead style="color:#333333;">
                        <tr>
					        <th><input class="check-all" type="checkbox" /></th>
						    <th>Name</th>
						    <th>Price</th>
						    <th>Parent Service</th>
						    <th></th>
                         </tr>           
				    </thead>
                     <tfoot>
					    <tr>
						    <td colspan="6">
							    <%--<div class="bulk-actions align-left">
								    <select name="dropdown">
									    <option value="option1">Choose an action...</option>
									    <option value="option2">Edit</option>
									    <option value="option3">Delete</option>
								    </select>
								    <a class="button" href="#">Apply to selected</a>
							    </div>--%>
										
							    <div class="pagination">
								    <% Html.RenderPartial("Pager", Model.PagerModel); %>
							    </div> <!-- End .pagination -->
							    <div class="clear"></div>
						    </td>
					    </tr>
				    </tfoot>
                    <tbody>
                        <% foreach (var item in Model.Services) { %>
                            <tr>
                                <td><input type="checkbox" /></td>
                                <td>
                                    <%: item.Name %>
                                </td>
                                <td>
                                    <%: item.Price %>
                                </td>
                                <td>
                                    <% if(item.ParentID !=null) %>
                                        <%: item.Service1.Name %>
                                </td>

                                <td align="right" style="text-align: right; width: 100px;">
                                    <a href="<%: Url.Action("Edit", new { id = item.ServiceID}) %>" title="Edit" >
                                    <img src="../../Content/images/icons/pencil.png" alt="Edit" />
                                    </a>
                                    <a href="<%: Url.Action("Delete", new { id = item.ServiceID}) %>" title="Delete" >
                                       <img src="../../Content/images/icons/cross.png" alt="Delete" />
                                    </a>	
							        <a href="<%: Url.Action("Details", new { id = item.ServiceID}) %>" title="Details" >
                                       <img src="../../Content/images/icons/hammer_screwdriver.png" alt="Details" />
                                    </a>
                                </td>
                            </tr>
    
                        <% } %>
                   </tbody>
               </table>

    <p>
        <a class="button" href="<%: Url.Action("Create") %>" title="Create new" >Create New </a>
    </p>

</asp:Content>
